{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<div class="t-n-s-top">
    <div class="tables-searchbox">
	<form method="post">
		<div class="mgt10">
			<span class="tbs-txt">选择时间：</span>
			<input type="text" autocomplete="off" class="Wdate" name="add_time" value="{$add_time|date_format:'%Y-%m-%d'}"  onclick="WdatePicker()">
			<button type="submit" class="btn"><i class="gicon-search"></i>搜索</button>
		</div>
	</form>
	</div>

	<div class="t-month-chart" id="month_container">
	</div>
</div>
{/block} 

{block name="js"}
<script type="text/javascript" src="/Public/Plugins/Highcharts/highcharts.js?version={$version}"></script>
<script src="/Public/Plugins/My97DatePicker/WdatePicker.js?version={$version}"></script>
<script type="text/javascript">
var recharge_amount_stat_list = '[';
var recharge_num_stat_list = '[';
{foreach from=$recharge_amount_stat_list key=key item=item}
	recharge_amount_stat_list = recharge_amount_stat_list + {$item} + ',';
{/foreach}
recharge_amount_stat_list = recharge_amount_stat_list.substring(0, recharge_amount_stat_list.length - 1);
recharge_amount_stat_list += ']';

{foreach from=$recharge_num_stat_list key=key item=item}
	recharge_num_stat_list = recharge_num_stat_list + {$item} + ',';
{/foreach}
recharge_num_stat_list = recharge_num_stat_list.substring(0, recharge_num_stat_list.length - 1);
recharge_num_stat_list += ']';
var d = '{$date}';
{literal}
$(function (){
var chart = new Highcharts.Chart({
	chart: {
		renderTo: 'month_container',
		defaultSeriesType: 'line'
	},
	title: {
		text: d + ' 充值统计'
	},
	subtitle: {
		text: ''
	},
	xAxis: {
		categories: ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24']
	},
	yAxis: {
		title: {
			text: 'RMB(元)|次'
		}
	},
	tooltip: {
		enabled: false,
		formatter: function() {
			return '<b>'+ this.series.name +'</b><br/>'+
				this.x +': '+ this.y +'°C';
		}
	},
	plotOptions: {
		line: {
			dataLabels: {
				enabled: true
			},
			enableMouseTracking: false
		}
	},
	series: [{
		name: '充值金额',
		data: eval(recharge_amount_stat_list)
	}, {
		name: '充值次数',
		data: eval(recharge_num_stat_list)
	}]
});
});
</script>
{/literal}
{/block} 

{block name="css"}
<link rel="stylesheet" href="/Public/Css/acp/AcpOrder/order_num_stat.css" type="text/css" />
{/block} 
